{
  "guild": {
    "id": "1361349522684510449",
    "name": "wafer.space Community",
    "iconUrl": "2025-12_media/fb143eaa45770cbb40493d09b625e98b-09FD1.png"
  },
  "channel": {
    "id": "1445300879862403164",
    "type": "GuildPublicThread",
    "categoryId": "1423348662318272592",
    "category": "\uD83D\uDCDD-project-template",
    "name": "Running DRC in parallel",
    "topic": null
  },
  "dateRange": {
    "after": "2025-11-30T23:59:59.999+00:00",
    "before": "2026-01-01T00:00:00+00:00"
  },
  "exportedAt": "2026-07-08T21:49:40.9339431+00:00",
  "messages": [
    {
      "id": "1445304279584739429",
      "type": "21",
      "timestamp": "2025-12-02T06:43:12.708+00:00",
      "timestampEdited": null,
      "callEndedTimestamp": null,
      "isPinned": false,
      "content": "",
      "author": {
        "id": "732347216412278825",
        "name": "urish",
        "discriminator": "0000",
        "nickname": "urish",
        "color": null,
        "isBot": false,
        "roles": [
          {
            "id": "1423020172595298314",
            "name": "Mod",
            "color": null,
            "position": 4
          }
        ],
        "avatarUrl": "2025-12_media/2b6c3aac0ae09fc8a72a4b2e17d7f9c9-39032.png"
      },
      "attachments": [],
      "embeds": [],
      "stickers": [],
      "reactions": [],
      "mentions": [
        {
          "id": "384390069412429834",
          "name": "polyfractal",
          "discriminator": "0000",
          "nickname": "BreakingTaps",
          "color": null,
          "isBot": false,
          "roles": [],
          "avatarUrl": "2025-12_media/8d8c1d8b8ad51d6cdb1a47512c39b297-42908.png"
        }
      ],
      "reference": {
        "messageId": "1445300879862403164",
        "channelId": "1423348662318272592",
        "guildId": "1361349522684510449"
      },
      "inlineEmojis": []
    },
    {
      "id": "1445304282638454847",
      "type": "Default",
      "timestamp": "2025-12-02T06:43:13.436+00:00",
      "timestampEdited": null,
      "callEndedTimestamp": null,
      "isPinned": false,
      "content": "Last time I asked Leo about it, his main concern was the memory requirements",
      "author": {
        "id": "732347216412278825",
        "name": "urish",
        "discriminator": "0000",
        "nickname": "urish",
        "color": null,
        "isBot": false,
        "roles": [
          {
            "id": "1423020172595298314",
            "name": "Mod",
            "color": null,
            "position": 4
          }
        ],
        "avatarUrl": "2025-12_media/2b6c3aac0ae09fc8a72a4b2e17d7f9c9-39032.png"
      },
      "attachments": [],
      "embeds": [],
      "stickers": [],
      "reactions": [],
      "mentions": [],
      "inlineEmojis": []
    },
    {
      "id": "1445304528537911448",
      "type": "Default",
      "timestamp": "2025-12-02T06:44:12.063+00:00",
      "timestampEdited": null,
      "callEndedTimestamp": null,
      "isPinned": false,
      "content": "ah, yeah that's fair as a default. would be nice to have the option though (I rented a beefy dedicated server for building/checks this month)",
      "author": {
        "id": "384390069412429834",
        "name": "polyfractal",
        "discriminator": "0000",
        "nickname": "BreakingTaps",
        "color": null,
        "isBot": false,
        "roles": [],
        "avatarUrl": "2025-12_media/8d8c1d8b8ad51d6cdb1a47512c39b297-42908.png"
      },
      "attachments": [],
      "embeds": [],
      "stickers": [],
      "reactions": [
        {
          "emoji": {
            "id": "",
            "name": "\uD83D\uDC4D",
            "code": "thumbsup",
            "isAnimated": false,
            "imageUrl": "2025-12_media/1f44d-27259.svg"
          },
          "count": 1,
          "users": [
            {
              "id": "732347216412278825",
              "name": "urish",
              "discriminator": "0000",
              "nickname": "urish",
              "color": null,
              "isBot": false,
              "avatarUrl": "2025-12_media/2b6c3aac0ae09fc8a72a4b2e17d7f9c9-39032.png"
            }
          ]
        }
      ],
      "mentions": [],
      "inlineEmojis": []
    },
    {
      "id": "1445304688714190878",
      "type": "Default",
      "timestamp": "2025-12-02T06:44:50.252+00:00",
      "timestampEdited": null,
      "callEndedTimestamp": null,
      "isPinned": false,
      "content": "Agreed",
      "author": {
        "id": "732347216412278825",
        "name": "urish",
        "discriminator": "0000",
        "nickname": "urish",
        "color": null,
        "isBot": false,
        "roles": [
          {
            "id": "1423020172595298314",
            "name": "Mod",
            "color": null,
            "position": 4
          }
        ],
        "avatarUrl": "2025-12_media/2b6c3aac0ae09fc8a72a4b2e17d7f9c9-39032.png"
      },
      "attachments": [],
      "embeds": [],
      "stickers": [],
      "reactions": [],
      "mentions": [],
      "inlineEmojis": []
    },
    {
      "id": "1445333512269070365",
      "type": "Default",
      "timestamp": "2025-12-02T08:39:22.323+00:00",
      "timestampEdited": null,
      "callEndedTimestamp": null,
      "isPinned": false,
      "content": "KLayout can run DRC in three different modes: flat, deep and tiled.\nTiled is inherently multithreaded, and I believe deep is multithreaded in some parts.\nHowever, not all modes work equally. While deep is mostly compatible with flat, tiled mode needs careful considerations in the DRC rules.\n\nWhy can't separate DRC operations be multithreaded?\nKLayout executes the DRC deck interactively, meaning one operation runs after another. This allows easy branching on calculated results, however, it does not allow operations to be parallelized, since dependencies are unknown.\nKLayout would need a flow graph based model to do that.\n\nA quick and dirty way to add parallelization would be to manually split the rule deck and start n processes of KLayout.\nThis is what the `run_drc.py` script does, and I can integrate it into LibreLane for the second run.\nHowever, this also means n times the memory consumption.\n\nI think most of these issues also apply to magic. There the default DRC mode is also a kind of deep mode based on cells. As far as I know, there is no parallelization available.",
      "author": {
        "id": "323371864074485771",
        "name": "mole99",
        "discriminator": "0000",
        "nickname": "Leo Moser (mole99)",
        "color": null,
        "isBot": false,
        "roles": [
          {
            "id": "1423020172595298314",
            "name": "Mod",
            "color": null,
            "position": 4
          }
        ],
        "avatarUrl": "2025-12_media/3c7c17f3225f6e56f4dccd83f14383f2-73F83.png"
      },
      "attachments": [],
      "embeds": [],
      "stickers": [],
      "reactions": [
        {
          "emoji": {
            "id": "",
            "name": "❤️",
            "code": "heart",
            "isAnimated": false,
            "imageUrl": "2025-12_media/2764-A3D25.svg"
          },
          "count": 1,
          "users": [
            {
              "id": "384390069412429834",
              "name": "polyfractal",
              "discriminator": "0000",
              "nickname": "BreakingTaps",
              "color": null,
              "isBot": false,
              "avatarUrl": "2025-12_media/8d8c1d8b8ad51d6cdb1a47512c39b297-42908.png"
            }
          ]
        }
      ],
      "mentions": [],
      "inlineEmojis": []
    },
    {
      "id": "1445430006930079885",
      "type": "Default",
      "timestamp": "2025-12-02T15:02:48.443+00:00",
      "timestampEdited": null,
      "callEndedTimestamp": null,
      "isPinned": false,
      "content": "interesting, thanks for the extra details!\n\nI guess I don't know enough about the actual DRC rules themselves, why would it need branching? I assumed rules were like \"if line width < X\" or \"If polygons too close together\"",
      "author": {
        "id": "384390069412429834",
        "name": "polyfractal",
        "discriminator": "0000",
        "nickname": "BreakingTaps",
        "color": null,
        "isBot": false,
        "roles": [],
        "avatarUrl": "2025-12_media/8d8c1d8b8ad51d6cdb1a47512c39b297-42908.png"
      },
      "attachments": [],
      "embeds": [],
      "stickers": [],
      "reactions": [],
      "mentions": [],
      "inlineEmojis": []
    },
    {
      "id": "1445433855119986760",
      "type": "Default",
      "timestamp": "2025-12-02T15:18:05.923+00:00",
      "timestampEdited": null,
      "callEndedTimestamp": null,
      "isPinned": false,
      "content": "The KLayout DRC engine is actually just a Ruby interpreter with DRC functions: https://www.klayout.de/doc/manual/drc_basic.html\n\n> The DRC functionality is controlled by a DRC script. A DRC script is basically a piece of code which is executed in the context of the DRC engine. The script language is based on KLayout's integrated Ruby interpreter and wraps the underlying object model into a lean and expressive language. Script execution is immediate. That means, that it is possible to embed conditional statements or loops based on the result of a previous operation. It is also possible to code low-level operations on shapes inside the script, although this will be considerably slower than using the functions provided.\n\nIt is quite versatile and it even handles connectivity e.g. for antenna checks and extraction for LVS.\n\nI don't think it would be necessary required to have this interactive/immediate operation mode, but this is simply due to the way it is implemented. However, it does allow for some useful tricks: e.g. iteratively filling until a target density is met, to name just one.\n\nStill, it would be great to have a non immediate mode as well, as it could parallelize execution, throw out unused expressions, automatically free memory after last use etc.",
      "author": {
        "id": "323371864074485771",
        "name": "mole99",
        "discriminator": "0000",
        "nickname": "Leo Moser (mole99)",
        "color": null,
        "isBot": false,
        "roles": [
          {
            "id": "1423020172595298314",
            "name": "Mod",
            "color": null,
            "position": 4
          }
        ],
        "avatarUrl": "2025-12_media/3c7c17f3225f6e56f4dccd83f14383f2-73F83.png"
      },
      "attachments": [],
      "embeds": [],
      "stickers": [],
      "reactions": [],
      "mentions": [],
      "inlineEmojis": []
    }
  ],
  "messageCount": 7
}